package br.com.menu;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Point;

import br.com.componentes.SpriteFont;

public class Menu
{
	SpriteFont spEntrada;  
	SpriteFont spPause; 
	SpriteFont spRodando;
	SpriteFont spGameover;
	
	public int itemSelecionado = 1;
	
	public void setup( )
	{
		spEntrada  = new SpriteFont( );
		spPause    = new SpriteFont( );
		spRodando  = new SpriteFont( );
		spGameover = new SpriteFont( );
				
		spEntrada.setTexto("ENTRADA");
		spPause.setTexto("PAUSE");
		spRodando.setTexto("RODANDO");
		spGameover.setTexto("GAMEOVER");
		
		spEntrada.setTexto("ENTRADE");
		spPause.setTexto("PAUSE");
		spRodando.setTexto("RODANDO");
		spGameover.setTexto("GAMEOVER");
		
		spEntrada.setLocation(new Point(0, 0));
		spPause.setLocation(new Point(0, 30));
		spRodando.setLocation(new Point(0, 60));
		spGameover.setLocation(new Point(0, 90));
	}

	public void update( long time ) 
	{
		switch ( itemSelecionado ) 
		{
			case 1:
				spEntrada.setColor(Color.BLUE);
				spPause.setColor(Color.BLACK);
				spRodando.setColor(Color.BLACK);
				spGameover.setColor(Color.BLACK);
				break;
			case 2:
				spEntrada.setColor(Color.BLACK);
				spPause.setColor(Color.BLUE);
				spRodando.setColor(Color.BLACK);
				spGameover.setColor(Color.BLACK);
				break;
			case 3:
				spEntrada.setColor(Color.BLACK);
				spPause.setColor(Color.BLACK);
				spRodando.setColor(Color.BLUE);
				spGameover.setColor(Color.BLACK);
				break;
			case 4:
				spEntrada.setColor(Color.BLACK);
				spPause.setColor(Color.BLACK);
				spRodando.setColor(Color.BLACK);
				spGameover.setColor(Color.BLUE);
				break;
		}
	}

	public void draw( Graphics2D g )
	{
		spEntrada.draw(g);
		spPause.draw(g);
		spRodando.draw(g);
		spGameover.draw(g);
	}
}